<!--<!DOCTYPE html>-->
<!--<html lang="en">-->
<!--<head>-->
<!--    <meta charset="UTF-8">-->
<!--    <title>Title</title>-->
<!--</head>-->
<!--<body>-->
<!--<form action="/ssm/ali/pay" method="post">-->
<!--    订单号：<input type="text" name="outTradeNo" required><br/>-->
<!--    订单名称：<input type="text" name="subject" required><br/>-->
<!--    付款金额：<input type="text" name="totalAmount" required><br/>-->
<!--    商品描述：<input type="text" name="body"><br/>-->
<!--    <input type="submit" value="下单"> <input type="reset" value="重置">-->
<!--</form>-->
<!--</body>-->
<!--</html>-->

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>



</head>
<body>


<div id="app">

    <el-form :model="info" label-width="80px">

        <el-form-item label="订单号">
            <el-input v-model="info.outTradeNo"></el-input>
        </el-form-item>

        <el-form-item label="名称">
            <el-input v-model="info.subject"></el-input>
        </el-form-item>
        <el-form-item label="支付价格">
            <el-input v-model="info.totalAmount"></el-input>
        </el-form-item>




        <el-form-item>
            <el-button type="primary" @click="onSubmit">立即支付</el-button>
            <el-button>取消</el-button>
        </el-form-item>


    </el-form>



</div>

<script type="text/javascript">
    var app = new Vue({

        el: "#app",
        data: {
            info: {
                outTradeNo:'',
                subject: '',
                totalAmount: ''

            }
        },
        methods: {
            onSubmit() {

                var outTradeNo = Math.random()*10000000;
                var subject = 'd';
                var totalAmount=app.info.totalAmount
                location.href="/ssm/ali/pay/?outTradeNo="+outTradeNo+"&subject="+subject+"&totalAmount="+totalAmount;

            }

        }
    })
</script>

</body>
</html>
